Skip to content

Instantly share code, notes, and snippets.

Optlam.js - 3.4 million IPS

// ~~~~~~~~~~~~~~~~~~~~~~ Optlam.js ~~~~~~~~~~~~~~~~~~~~~~
// An optimal λ-calculus normalizer written in JavaScript.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Optlam.js is a simple, optimal (in Levy's sense) λ-calculus evaluator using
// interaction nets. It is, currently, as far as I know, the fastest
// implementation of functions in the world. It uses Lamping's Abstract
// Algorithm - that is, the so called (and problematic) "oracle" is avoided
@RabaDabaDoba
RabaDabaDoba / ANSI-color-codes.h
Last active May 10, 2024 21:56 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes working in C!
/*
* This is free and unencumbered software released into the public domain.
*
* For more information, please refer to <https://unlicense.org>
*/
//Regular text
#define BLK "\e[0;30m"
#define RED "\e[0;31m"
#define GRN "\e[0;32m"
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active May 10, 2024 21:55
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@hadilq
hadilq / NixOS-guide.md
Last active May 10, 2024 21:54
Encypted LUKS LVM Btrfs Root with Opt-in State on NixOS

I'm trying to follow this guide to install NixOS using Btrfs, LUKS and LVM. The main usage of this page for me will be remembering what I did! My laptop is ASUS ROG GL553VD.

Just downloaded Plasma Desktop, 64bit and create a bootable Flash Drive. Then boot up to NixOS Live CD. Using gparted to create two partitions, One 200MB vfat EFI partittion and the rest of SSD drive will be an encrypted partition.

DISK=/dev/nvme0n1
@vchernogorov
vchernogorov / _readme.md
Last active May 10, 2024 21:49
Многопоточность в Java
@AveYo
AveYo / . Pitch Black Theme.reg
Last active May 10, 2024 21:49
Pitch Black Theme.reg - now for Ctrl+Alt+Del (and logon on 11) as well - revised 2022-06-16
Windows Registry Editor Version 5.00
; Pitch Black Theme preset by AveYo, AccentPalette idea by /u/Egg-Tricky
; for Ctrl+Alt+Del, Logon, Taskbar, Start Menu, Action Center (10 & 11)
; revised 2022-06-16: show active taskbar button in accent color
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
"AccentColorMenu"=dword:aa000000 ; Window borders and titlebar
"StartColorMenu"=dword:aa202020 ; Modals in UWP ex. Apply new refresh rate in 10
@chuongmep
chuongmep / PurgeCAD.cs
Last active May 10, 2024 21:45
Purge CAD
public static void PurgesCAD()
{
Document doc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
using (Transaction Tx = db.TransactionManager.StartTransaction())
{
BlockTable table = Tx.GetObject(db.BlockTableId,
OpenMode.ForRead) as BlockTable;
ObjectIdCollection blockIds = new ObjectIdCollection();
do
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@bearlikelion
bearlikelion / Log.gd
Last active May 10, 2024 21:44
Godot debug screen console autoload
extends Node
var debug: bool = OS.has_feature("debug")
@onready var panel: Panel = Panel.new()
@onready var canvas_layer: CanvasLayer = CanvasLayer.new()
@onready var rich_text_label: RichTextLabel = RichTextLabel.new()
# @onready var theme: Theme = load("res://SurvivalScape.theme") # Your custom theme file
func _ready() -> void:
@ertugrulturan
ertugrulturan / routeros.sh
Last active May 10, 2024 21:44
RouterOS Install Ubuntu 20.04/22.04 Server
#!/bin/bash
wget https://download.mikrotik.com/routeros/7.13.3/chr-7.13.3.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
mount -o loop,offset=512 chr.img /mnt && \
ADDRESS=`ip addr show ens18 | grep global | cut -d ' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d ' ' -f 3` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
/ip service disable telnet
/user set 0 name=root password=xxxxxx"